package com.model.dto.sys.userController;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * @Author: zql
 * @Description:
 * @Data: 14:41 2021/7/22
 */
@Data
public class GetPasswordKeyByMobileDTO {
    /** 手机号 */
    @ApiModelProperty(value = "手机号长度为11位，手机号只能是数字",required = true)
    @NotEmpty
    @NotNull(message = "手机号不能为空")
    @Size(min = 11, max = 11, message = "手机号长度为11位")
    @Pattern(regexp = "^[0-9]*$", message = "手机号只能是数字")
    String mobile;

    @ApiModelProperty(value = "验证码不能为空，验证码长度限制为4位",required = true)
    @NotNull(message = "验证码不能为空")
    @Size(min = 4, max = 4, message = "验证码长度限制为4位")
    String code;
}
